import request from '@/utils/request'

// 查询商户信息列表
export function listAgent(query) {
  return request({
    url: '/agent/list',
    method: 'get',
    params: query
  })
}

// 查询商户信息详细
export function getAgent(agentNo) {
  return request({
    url: '/agent/' + agentNo,
    method: 'get'
  })
}

export function updateAgentUserPayPwd(data) {
  return request({
    url: '/agent/updateUserPayPwd',
    method: 'post',
    data: data
  })
}

// 新增商户信息
export function addAgent(data) {
  return request({
    url: '/agent',
    method: 'post',
    data: data
  })
}


export function resetAgentGoogle(id) {
  return request({
    url: '/agent/resetGoogle/' + id,
    method: 'delete',
  })
}
// 修改商户信息
export function updateAgent(data) {
  return request({
    url: '/agent',
    method: 'put',
    data: data
  })
}

// 删除商户信息
export function delAgent(agentNo) {
  return request({
    url: '/agent/' + agentNo,
    method: 'delete'
  })
}
